1. Technical Field
The present invention is directed to a path balancing apparatus and method. In particular, the present invention is directed to an apparatus and method for workload balancing along multiple communication paths to a plurality of devices.
2. Description of Related Art
Systems are known in which multiple peripheral devices may be accessed by processing devices via multiple communication paths. Multiple processing devices may access the peripheral devices over the same communication path. Thus, some of these communication paths may be more utilized than others leading to an imbalance in the workloads for the communication paths. This situation may lead to a loss in throughput of the overall system.
As a solution to this problem, the known systems require the peripheral devices to be manually configured or new peripheral devices to be added to the system to compensate for the imbalance in workloads. However, this solution has proven unsatisfactory in that the workloads of the communication paths do not become adequately balanced. Thus, a need is present for new technology to provide an apparatus and method for balancing workloads across a plurality of communication paths.
The present invention provides an apparatus and method for workload balancing along multiple communication paths to a plurality of devices. The apparatus includes a controller that accumulates path usage information and a path balancing device that makes use of the accumulated path usage information to perform a path balancing operation.
The path balancing method of the present invention involves the path balancing device calculating the total expected connect time for all I/O messages issued to each of a plurality of peripheral devices during a predefined sampling period. These totals are then added for each communication path for the sampling period to obtain path totals. The path totals are then compared to see if a difference between the highest used path and the lowest used path is greater than a threshold amount. If the difference is higher than the threshold amount, the peripheral device having a total expected connect time that is closest to a target value is moved from the highest used path to the lowest used path.
In this way, the lowest used path will receive more I/O messages while the highest used path will receive less I/O messages. Over a number of iterations, the difference between the highest use path and the lowest used path should fall below the threshold amount and the system will be well balanced.